package cn.sciento.transfer.api.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import cn.sciento.mybatis.domian.SecurityToken;
import cn.sciento.transfer.domain.entity.ConsDbConfig;

@ApiModel("数据消息消费DB配置DTO")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ConsDbConfigDTO implements SecurityToken {
  @ApiModelProperty("DB配置ID")
  private Long consDbConfigId;
  
  @ApiModelProperty(value = "消费服务名", required = true)
  private String consServiceName;
  
  @ApiModelProperty(value = "DB编码", required = true)
  private String consDbCode;
  
  @ApiModelProperty(value = "消费表名", required = true)
  private String consTableName;
  
  @ApiModelProperty("消费消息偏移起始数")
  private Long consumerOffset;
  
  @ApiModelProperty(value = "是否启用。1启用，0未启用", required = true)
  private Integer enabledFlag;
  
  @ApiModelProperty(hidden = true)
  private Long objectVersionNumber;
  
  @ApiModelProperty(hidden = true)
  private String _token;
  
  public Long getConsDbConfigId() {
    return this.consDbConfigId;
  }
  
  public void setConsDbConfigId(Long consDbConfigId) {
    this.consDbConfigId = consDbConfigId;
  }
  
  public String getConsServiceName() {
    return this.consServiceName;
  }
  
  public void setConsServiceName(String consServiceName) {
    this.consServiceName = consServiceName;
  }
  
  public String getConsDbCode() {
    return this.consDbCode;
  }
  
  public void setConsDbCode(String consDbCode) {
    this.consDbCode = consDbCode;
  }
  
  public String getConsTableName() {
    return this.consTableName;
  }
  
  public void setConsTableName(String consTableName) {
    this.consTableName = consTableName;
  }
  
  public Long getConsumerOffset() {
    return this.consumerOffset;
  }
  
  public void setConsumerOffset(Long consumerOffset) {
    this.consumerOffset = consumerOffset;
  }
  
  public Integer getEnabledFlag() {
    return this.enabledFlag;
  }
  
  public void setEnabledFlag(Integer enabledFlag) {
    this.enabledFlag = enabledFlag;
  }
  
  public Long getObjectVersionNumber() {
    return this.objectVersionNumber;
  }
  
  public void setObjectVersionNumber(Long objectVersionNumber) {
    this.objectVersionNumber = objectVersionNumber;
  }
  
  public String toString() {
    return "ConsDbConfigDTO{consDbConfigId=" + this.consDbConfigId + ", consServiceName='" + this.consServiceName + '\'' + ", consDbCode='" + this.consDbCode + '\'' + ", consTableName='" + this.consTableName + '\'' + ", consumerOffset=" + this.consumerOffset + ", enabledFlag=" + this.enabledFlag + ", objectVersionNumber=" + this.objectVersionNumber + '}';
  }
  
  public String get_token() {
    return this._token;
  }
  
  public void set_token(String _token) {
    this._token = _token;
  }
  
  public Class<? extends SecurityToken> associateEntityClass() {
    return (Class)ConsDbConfig.class;
  }
}
